package com.itheima.demo07;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author Zhang_Han
 * @version 1.0
 * @date 2020/7/14 14:20
 */
public class MyThread03 implements Runnable {
    AtomicInteger ai = new AtomicInteger();

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            int count = ai.incrementAndGet();
            System.out.println("已经送出了" + count + "个冰激凌!");
        }
    }
}
